-- poet_song
-- created by wangy
-- 击杀敌人增加属性N（吟游诗人之歌）

return {
    apply = function(prop, baseValue)
        return baseValue + prop[3];
    end,

    -- 击杀触发
    trigger = function(who, prop, arg)

        local attrib = prop[2];
        local value  = prop[3];

        -- 获取地牢难度系数
        local dugeonId = DungeonM.getDungeonId();
        if dugeonId == nil then
            dugeonId = ME.user.dbase:query("currentDungeon");
        end
        local layerFix = DungeonAreaM.query(dugeonId, "layer_fix");

        -- 探索点需要根据公式计算
        if attrib == "search_point" then
            value = value + math.modf(value * layerFix / 64);
        end

        local bonus = { 2, attrib, value, };
        BonusM.doBonus({ 2, attrib, value, }, "prop poet_song");

        -- 触发特技发动事件
        EventMgr.fire(event.SPECIAL_SKILL_TRIGGER, { propId = prop[1] });

        return prop[3];
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};